{{if (isinstance(form, SQLFORM) and form.errors): response.flash=T('Check errors in the form')}}
{{extend 'plugin_PowerGrid/layout.html'}}
{{if (isinstance(form, SQLFORM) and form.errors):}}
    <script type='text/javascript'>
    $(document).ready(function () {
     //add java script here  
    });
    </script>
{{pass}}
{{=form}}